package com.cxhc.system.service.app.impl;

import java.util.List;

import com.cxhc.system.domain.app.ExaminationUser;
import com.cxhc.system.domain.app.ExaminationUserQuestion;
import com.cxhc.system.mapper.app.ExaminationUserMapper;
import com.cxhc.system.service.app.IExaminationUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 用户考试场次记录Service业务层处理
 * 
 * @author Dhq
 * @date 2024-08-01
 */
@Service
public class ExaminationUserServiceImpl implements IExaminationUserService
{
    @Autowired
    private ExaminationUserMapper examinationUserMapper;

    /**
     * 查询用户考试场次记录
     * 
     * @param id 用户考试场次记录主键
     * @return 用户考试场次记录
     */
    @Override
    public ExaminationUser selectExaminationUserById(Long id)
    {
        return examinationUserMapper.selectExaminationUserById(id);
    }

    @Override
    public ExaminationUser selectExaminationUserByUserIdAndExaminationId(Long userId, Long examinationId)
    {
        return examinationUserMapper.selectExaminationUserByUserIdAndExaminationId(userId, examinationId);
    }

    @Override
    public List<ExaminationUserQuestion> selectDetailesByUserIdAndExaminationId(String userId, String examinationId) {

        return examinationUserMapper.selectDetailesByUserIdAndExaminationId(userId,examinationId);
    }

    /**
     * 查询用户考试场次记录列表
     * 
     * @param examinationUser 用户考试场次记录
     * @return 用户考试场次记录
     */
    @Override
    public List<ExaminationUser> selectExaminationUserList(ExaminationUser examinationUser)
    {
        return examinationUserMapper.selectExaminationUserList(examinationUser);
    }

    /**
     * 新增用户考试场次记录
     * 
     * @param examinationUser 用户考试场次记录
     * @return 结果
     */
    @Override
    public int insertExaminationUser(ExaminationUser examinationUser)
    {
        return examinationUserMapper.insertExaminationUser(examinationUser);
    }

    /**
     * 修改用户考试场次记录
     * 
     * @param examinationUser 用户考试场次记录
     * @return 结果
     */
    @Override
    public int updateExaminationUser(ExaminationUser examinationUser)
    {
        return examinationUserMapper.updateExaminationUser(examinationUser);
    }

    /**
     * 批量删除用户考试场次记录
     * 
     * @param ids 需要删除的用户考试场次记录主键
     * @return 结果
     */
    @Override
    public int deleteExaminationUserByIds(Long[] ids)
    {
        return examinationUserMapper.deleteExaminationUserByIds(ids);
    }

    /**
     * 删除用户考试场次记录信息
     * 
     * @param id 用户考试场次记录主键
     * @return 结果
     */
    @Override
    public int deleteExaminationUserById(Long id)
    {
        return examinationUserMapper.deleteExaminationUserById(id);
    }
}
